package com.example.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.Danjingjichu;
import com.example.entity.Danjingxiaoceng;
import com.example.service.DanJingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class JichuController {
    @Autowired
    DanJingService danJingService;

    @RequestMapping("/getDanjing")
    @ResponseBody
    public Page<Danjingxiaoceng> getDanjingList(@RequestParam(value = "jh") String jh, @RequestParam(value = "pagenum") Integer pagenum, @RequestParam(value = "pagesize") Integer pagesize){
        return danJingService.getAllDanJing(jh,pagenum,pagesize);
    }
    @RequestMapping("/getJichu")
    @ResponseBody
    public Page<Danjingjichu> getJinchuList(@RequestParam(value = "jh") String jh, @RequestParam(value = "pagenum") Integer pagenum, @RequestParam(value = "pagesize") Integer pagesize){
        return danJingService.getALLJiChu(jh,pagenum,pagesize);
    }

}
